package com.weilai.domain;

import java.time.LocalDateTime;

public class Comments {
    // 定义与表字段对应的私有属性
    private int id;
    private int userId;
    private int postId;
    private int videoId;
    private String content;
    private LocalDateTime createdAt;
    private int likeCount;
    private int isLiked;


    @Override
    public String toString() {
        return "Comments{" +
                "id=" + id +
                ", userId=" + userId +
                ", postId=" + postId +
                ", videoId=" + videoId +
                ", content='" + content + '\'' +
                ", createdAt=" + createdAt +
                ", likeCount=" + likeCount +
                ", isLiked=" + isLiked +
                '}';
    }

    // 无参构造函数
    public Comments() {
    }

    // 有参构造函数
    public Comments(int id, int userId, int postId,int videoId, String content, LocalDateTime createdAt, int likeCount,int isLiked) {
        this.id = id;
        this.userId = userId;
        this.postId = postId;
        this.videoId = videoId;
        this.content = content;
        this.createdAt = createdAt;
        this.likeCount = likeCount;
        this.isLiked = isLiked;
    }

    // id属性的getter方法
    public int getId() {
        return id;
    }
    // id属性的setter方法
    public void setId(int id) {
        this.id = id;
    }

    // userId属性的getter方法
    public int getUserId() {
        return userId;
    }
    // userId属性的setter方法
    public void setUserId( int userId) {
        this.userId = userId;
    }

    // postId属性的getter方法
    public int getPostId() {
        return postId;
    }
    // postId属性的setter方法
    public void setPostId(int postId) {
        this.postId = postId;
    }
    public int getVideoId() {
        return videoId;
    }
    public void setVideoId(int videoId) {
        this.videoId = videoId;
    }

    // content属性的getter方法
    public String getContent() {
        return content;
    }
    // content属性的setter方法
    public void setContent(String content) {
        this.content = content;
    }

    public LocalDateTime getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }
    public int getLikeCount() {
        return likeCount;
    }
    public void setLikeCount(int likeCount) {
        this.likeCount = likeCount;
    }
    public int getIsLiked() {
        return isLiked;
    }
    public void setIsLiked(int isLiked) {
        this.isLiked = isLiked;
    }
}
